package net.airtheva.uniqueTask2;

import java.io.File;

import android.app.Activity;
import android.app.Application;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {

	Button mLaunch = null;
	Button mClear = null;
	Button mExit = null;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		mLaunch = (Button) findViewById(R.id.activity_main_launch);
		mLaunch.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				MainActivity.this.startActivity(new Intent(MainActivity.this, LoginActivity.class));
	            overridePendingTransition(R.anim.fade, R.anim.hold);
			}
			
		});
		
		mClear = (Button) findViewById(R.id.activity_main_clear);
		mClear.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				(new File(API.PATH_JSON)).delete();
			}
			
		});
		
		mExit = (Button) findViewById(R.id.activity_main_exit);
		mExit.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				System.exit(0);
			}
			
		});
		
		
	}

}
